import React from 'react'
import styles from './index.css'

class Item extends React.Component{
    constructor(props){
        super(props)
    }
    handleChange(event){
        const {onChange} = this.props
        onChange(event)

    }
    render(){
        const ele = (<div style={{display:'flex',border:'1px solid #ccc'}}>
            <label htmlFor="" style={{flex:1}}>{this.props.labelText}</label>
            <input type="text" name="" style={{flex:2,border:'0px'}} placeholder={this.props.tips} onChange={this.handleChange.bind(this)} value={this.props.value}/>
        </div>)
        return ele
    }

}
export default Item